﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using PH.Model.Analyses;
using PH.Model.Analyses.Bureaus;
using PH.Data.Analyses;
namespace PH.Logic.Analyses
{
    public class BureauLogic
    {
        /// <summary>
        /// 按学校分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static B4SchoolCollection GetB4School(BAnalysisQuery sea)
        {
            if (sea.History)
                return PBCommand.GetPB4School(sea);
            return RBCommand.GetRB4School(sea);
        }
        /// <summary>
        /// 按生源地学校分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static B4OriSchoolCollection GetB4OriSchool(BAnalysisQuery sea)
        {
            if (sea.History)
                return PBCommand.GetPB4OriSchool(sea);
            return RBCommand.GetRB4OriSchool(sea);
        }
        /// <summary>
        /// 按机构分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static B4BureauCollection GetB4Bureau(BAnalysisQuery sea)
        {
            if (sea.History)
                return PBCommand.GetPB4Bureau(sea);
            return RBCommand.GetRB4Bureau(sea);
        }
        /// <summary>
        /// 机构分析样本采集进度
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static B4SampleBureauCollection GetB4SampleBureau(BAnalysisQuery sea)
        {
            if (sea.History)
                return PBCommand.GetPB4SampleBureau(sea);
            return RBCommand.GetRB4SampleBureau(sea);
        }
        /// <summary>
        /// 分析学校的样本采集进度
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static B4SampleSchoolCollection GetB4SampleSchool(B4SampleSchoolQuery sea)
        {
            if (sea.History)
                return PBCommand.GetPB4SampleSchool(sea);
            return RBCommand.GetRB4SampleSchool(sea);
        }
        /// <summary>
        /// 按年级分析
        /// </summary>
        /// <param name="sea"></param>
        /// <returns></returns>
        public static B4GradeCollection GetB4Grade(BAnalysisQuery sea)
        {
            if (sea.History)
                return PBCommand.GetRB4Grade(sea);
            return RBCommand.GetRB4Grade(sea);
        }
    }
}
